package com.jy.datapipeline.importserver.mapper;

import com.jy.datapipeline.importserver.entity.ImportTaskLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface ImportTaskLogMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ImportTaskLog record);

    int insertSelective(ImportTaskLog record);

    ImportTaskLog selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ImportTaskLog record);

    int updateByPrimaryKeyWithBLOBs(ImportTaskLog record);

    int updateByPrimaryKey(ImportTaskLog record);

    List<ImportTaskLog> selectByPage(@Param("pageNo") Long pageNo, @Param("pageSize") Long pageSize
            , @Param("subtaskId") String subtaskId, @Param("taskStatus") String taskStatus);

    long selectTotalSizeBySubtaskId(@Param("subtaskId") String subtaskId, @Param("taskStatus") String taskStatus);

    int deleteTaskLogsBySubtaskIds(String subtaskId);

    Integer lockResourceBySubtaskId(String subtaskId);

    Integer selectTaskLogsBySubtaskIds(String subtaskId);

    List<String> selectTaskLogFileNames(@Param("subtaskIds") Set<String> subtaskIds, @Param("datFileNotExistsExp") String datFileNotExistsExp);

    Integer selectResource(String subtaskId);

    int batchDelete(@Param("subtaskIds") Set<String> subtaskIds);
}